<?php
require_once dirname(__FILE__) . '/sc.php';
function Mail_send_function($to,$subject,$text,$from)
{
	$url = 'http://minder.minibird.jp/hlib/Mail/send.php?';
	$subject =urlencode($subject);
	$text = urlencode($text);
	$url .='to=' . $to . '&subject=' . $subject . '&text=' . $text . '&from=' . $from . '&sc=' . SC;
	$ch = curl_init ( $url );
	curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, true );
	$c = curl_exec ( $ch );
	return $c;
}

/**
 * 以下　単体テストコードブロック
 */
if (PATH_SEPARATOR == ';') {
include_once 'simpletest/unit_tester.php';
include_once 'simpletest/reporter.php';
if (class_exists('UnitTestCase')) {

class MailSendFunctionTest extends UnitTestCase {
	public function test1100(){
		$sc = Mail_send_function('hariushi@gmail.com', '関数から呼んでみた', '本文の状態', 'jsc@minder.minibird.jp');
		$this->assertEqual($sc, 0);
	}
}
}
}